diff --git a/api/api.c b/api/api.c
index c7f5db7..493b77f 100644
--- a/api/api.c
+++ b/api/api.c
@@ -57,7 +57,7 @@
 	if ((c = (int *)va_arg(ap, uintptr_t)) == NULL)
 		return API_EINVAL;
 
-	*c = getc();
+	*c = getchar();
 	return 0;
 }
 
diff --git a/cmd/bootmenu.c b/cmd/bootmenu.c
index 18efe25..1ba7b62 100644
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -99,7 +99,7 @@
 			}
 
 			menu->delay = -1;
-			c = getc();
+			c = getchar();
 
 			switch (c) {
 			case '\e':
@@ -141,7 +141,7 @@
 		mdelay(10);
 	}
 
-	c = getc();
+	c = getchar();
 
 	switch (*esc) {
 	case 0:
diff --git a/cmd/load.c b/cmd/load.c
index 63a9414..9a3a169 100644
--- a/cmd/load.c
+++ b/cmd/load.c
@@ -81,7 +81,7 @@
 		serial_setbrg();
 		udelay(50000);
 		for (;;) {
-			if (getc() == '\r')
+			if (getchar() == '\r')
 				break;
 		}
 	}
@@ -102,7 +102,7 @@
 	 */
 	for (i=0; i<100; ++i) {
 		if (tstc()) {
-			(void) getc();
+			getchar();
 		}
 		udelay(1000);
 	}
@@ -124,7 +124,7 @@
 		serial_setbrg();
 		udelay(50000);
 		for (;;) {
-			if (getc() == 0x1B) /* ESC */
+			if (getchar() == 0x1B) /* ESC */
 				break;
 		}
 	}
@@ -212,7 +212,7 @@
 	--len;	/* always leave room for terminating '\0' byte */
 
 	for (p=buf; p < buf+len; ++p) {
-		c = getc();		/* read character		*/
+		c = getchar();		/* read character		*/
 		if (do_echo)
 			putc(c);	/* ... and echo it		*/
 
@@ -229,7 +229,7 @@
 		}
 
 	    /* Check for the console hangup (if any different from serial) */
-	    if (gd->jt->getc != getc) {
+	    if (gd->jt->getc != getchar) {
 		if (ctrlc()) {
 		    return (-1);
 		}
@@ -276,7 +276,7 @@
 		serial_setbrg();
 		udelay(50000);
 		for (;;) {
-			if (getc() == '\r')
+			if (getchar() == '\r')
 				break;
 		}
 	}
@@ -288,7 +288,7 @@
 
 	printf("## Ready for S-Record upload, press ENTER to proceed ...\n");
 	for (;;) {
-		if (getc() == '\r')
+		if (getchar() == '\r')
 			break;
 	}
 	if (save_serial(offset, size)) {
@@ -305,7 +305,7 @@
 		serial_setbrg();
 		udelay(50000);
 		for (;;) {
-			if (getc() == 0x1B) /* ESC */
+			if (getchar() == 0x1B) /* ESC */
 				break;
 		}
 	}
@@ -459,7 +459,7 @@
 		serial_setbrg();
 		udelay(50000);
 		for (;;) {
-			if (getc() == '\r')
+			if (getchar() == '\r')
 				break;
 		}
 	}
@@ -505,7 +505,7 @@
 		serial_setbrg();
 		udelay(50000);
 		for (;;) {
-			if (getc() == 0x1B) /* ESC */
+			if (getchar() == 0x1B) /* ESC */
 				break;
 		}
 	}
@@ -528,7 +528,7 @@
 	 */
 	for (i=0; i<100; ++i) {
 		if (tstc()) {
-			(void) getc();
+			getchar();
 		}
 		udelay(1000);
 	}
@@ -831,7 +831,7 @@
 		/* get a packet */
 		/* wait for the starting character or ^C */
 		for (;;) {
-			switch (getc ()) {
+			switch (getchar()) {
 			case START_CHAR:	/* start packet */
 				goto START;
 			case ETX_CHAR:		/* ^C waiting for packet */
@@ -843,13 +843,13 @@
 START:
 		/* get length of packet */
 		sum = 0;
-		new_char = getc();
+		new_char = getchar();
 		if ((new_char & 0xE0) == 0)
 			goto packet_error;
 		sum += new_char & 0xff;
 		length = untochar(new_char);
 		/* get sequence number */
-		new_char = getc();
+		new_char = getchar();
 		if ((new_char & 0xE0) == 0)
 			goto packet_error;
 		sum += new_char & 0xff;
@@ -876,7 +876,7 @@
 		/* END NEW CODE */
 
 		/* get packet type */
-		new_char = getc();
+		new_char = getchar();
 		if ((new_char & 0xE0) == 0)
 			goto packet_error;
 		sum += new_char & 0xff;
@@ -886,19 +886,19 @@
 		if (length == -2) {
 			/* (length byte was 0, decremented twice) */
 			/* get the two length bytes */
-			new_char = getc();
+			new_char = getchar();
 			if ((new_char & 0xE0) == 0)
 				goto packet_error;
 			sum += new_char & 0xff;
 			len_hi = untochar(new_char);
-			new_char = getc();
+			new_char = getchar();
 			if ((new_char & 0xE0) == 0)
 				goto packet_error;
 			sum += new_char & 0xff;
 			len_lo = untochar(new_char);
 			length = len_hi * 95 + len_lo;
 			/* check header checksum */
-			new_char = getc();
+			new_char = getchar();
 			if ((new_char & 0xE0) == 0)
 				goto packet_error;
 			if (new_char != tochar((sum + ((sum >> 6) & 0x03)) & 0x3f))
@@ -908,7 +908,7 @@
 		}
 		/* bring in rest of packet */
 		while (length > 1) {
-			new_char = getc();
+			new_char = getchar();
 			if ((new_char & 0xE0) == 0)
 				goto packet_error;
 			sum += new_char & 0xff;
@@ -925,13 +925,13 @@
 			}
 		}
 		/* get and validate checksum character */
-		new_char = getc();
+		new_char = getchar();
 		if ((new_char & 0xE0) == 0)
 			goto packet_error;
 		if (new_char != tochar((sum + ((sum >> 6) & 0x03)) & 0x3f))
 			goto packet_error;
 		/* get END_CHAR */
-		new_char = getc();
+		new_char = getchar();
 		if (new_char != END_CHAR) {
 		  packet_error:
 			/* restore state machines */
@@ -955,7 +955,7 @@
 
 static int getcxmodem(void) {
 	if (tstc())
-		return (getc());
+		return (getchar());
 	return -1;
 }
 static ulong load_serial_ymodem(ulong offset, int mode)
diff --git a/common/autoboot.c b/common/autoboot.c
index 74f97a0..e628baf 100644
--- a/common/autoboot.c
+++ b/common/autoboot.c
@@ -117,7 +117,7 @@
 				return 0;
 			}
 
-			presskey[presskey_len++] = getc();
+			presskey[presskey_len++] = getchar();
 
 			/* Calculate sha256 upon each new char */
 			hash_block(algo_name, (const void *)presskey,
@@ -189,12 +189,12 @@
 	do {
 		if (tstc()) {
 			if (presskey_len < presskey_max) {
-				presskey[presskey_len++] = getc();
+				presskey[presskey_len++] = getchar();
 			} else {
 				for (i = 0; i < presskey_max - 1; i++)
 					presskey[i] = presskey[i + 1];
 
-				presskey[i] = getc();
+				presskey[i] = getchar();
 			}
 		}
 
@@ -257,7 +257,7 @@
 	 * Check if key already pressed
 	 */
 	if (tstc()) {	/* we got a key press	*/
-		(void) getc();  /* consume input	*/
+		getchar();	/* consume input	*/
 		puts("\b\b\b 0");
 		abort = 1;	/* don't auto boot	*/
 	}
@@ -272,7 +272,7 @@
 
 				abort  = 1;	/* don't auto boot	*/
 				bootdelay = 0;	/* no more delay	*/
-				key = getc(); /* consume input	*/
+				key = getchar();/* consume input	*/
 				if (IS_ENABLED(CONFIG_USE_AUTOBOOT_MENUKEY))
 					menukey = key;
 				break;
diff --git a/common/cli_readline.c b/common/cli_readline.c
index 1f1e28c..47b8762 100644
--- a/common/cli_readline.c
+++ b/common/cli_readline.c
@@ -68,7 +68,7 @@
 #define CREAD_HIST_CHAR		('!')
 
 #define getcmd_putch(ch)	putc(ch)
-#define getcmd_getch()		getc()
+#define getcmd_getch()		getchar()
 #define getcmd_cbeep()		getcmd_putch('\a')
 
 #define HIST_MAX		20
@@ -571,7 +571,7 @@
 			return -2;	/* timed out */
 		WATCHDOG_RESET();	/* Trigger watchdog, if needed */
 
-		c = getc();
+		c = getchar();
 
 		/*
 		 * Special character handling
diff --git a/common/console.c b/common/console.c
index 8e50af1..3348436 100644
--- a/common/console.c
+++ b/common/console.c
@@ -131,7 +131,7 @@
 		 */
 		switch (file) {
 		case stdin:
-			gd->jt->getc = getc;
+			gd->jt->getc = getchar;
 			gd->jt->tstc = tstc;
 			break;
 		case stdout:
@@ -179,7 +179,7 @@
 int cd_count[MAX_FILES];
 
 /*
- * This depends on tstc() always being called before getc().
+ * This depends on tstc() always being called before getchar().
  * This is guaranteed to be true because this routine is called
  * only from fgetc() which assures it.
  * No attempt is made to demultiplex multiple input sources.
@@ -404,7 +404,7 @@
 
 /** U-Boot INITIAL CONSOLE-COMPATIBLE FUNCTION *****************************/
 
-int getc(void)
+int getchar(void)
 {
 #ifdef CONFIG_DISABLE_CONSOLE
 	if (gd->flags & GD_FLG_DISABLE_CONSOLE)
@@ -663,7 +663,7 @@
 {
 	if (!ctrlc_disabled && gd->have_console) {
 		if (tstc()) {
-			switch (getc()) {
+			switch (getchar()) {
 			case 0x03:		/* ^C - Control C */
 				ctrlc_was_pressed = 1;
 				return 1;
@@ -685,10 +685,10 @@
 
 	/* Flush input */
 	while (tstc())
-		getc();
+		getchar();
 	i = 0;
 	while (i < sizeof(str_input)) {
-		str_input[i] = getc();
+		str_input[i] = getchar();
 		putc(str_input[i]);
 		if (str_input[i] == '\r')
 			break;
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 2845124..e979f78 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -32,7 +32,7 @@
 
 static int getcymodem(void) {
 	if (tstc())
-		return (getc());
+		return (getchar());
 	return -1;
 }
 
diff --git a/common/xyzModem.c b/common/xyzModem.c
index 6bf2375..fc3459e 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -72,7 +72,7 @@
     }
   if (tstc ())
     {
-      *c = getc ();
+      *c = getchar();
       return 1;
     }
   return 0;
diff --git a/drivers/ddr/fsl/main.c b/drivers/ddr/fsl/main.c
index 84139b8..c02badd 100644
--- a/drivers/ddr/fsl/main.c
+++ b/drivers/ddr/fsl/main.c
@@ -705,7 +705,7 @@
 
 	/* Compute it once normally. */
 #ifdef CONFIG_FSL_DDR_INTERACTIVE
-	if (tstc() && (getc() == 'd')) {	/* we got a key press of 'd' */
+	if (tstc() && (getchar() == 'd')) {	/* we got a key press of 'd' */
 		total_memory = fsl_ddr_interactive(pinfo, 0);
 	} else if (fsl_ddr_interactive_env_var_exists()) {
 		total_memory = fsl_ddr_interactive(pinfo, 1);
diff --git a/drivers/ram/stm32mp1/stm32mp1_interactive.c b/drivers/ram/stm32mp1/stm32mp1_interactive.c
index 38390c0..5a5d067 100644
--- a/drivers/ram/stm32mp1/stm32mp1_interactive.c
+++ b/drivers/ram/stm32mp1/stm32mp1_interactive.c
@@ -394,7 +394,7 @@
 		unsigned long start = get_timer(0);
 
 		while (1) {
-			if (tstc() && (getc() == 'd')) {
+			if (tstc() && (getchar() == 'd')) {
 				next_step = STEP_DDR_RESET;
 				break;
 			}
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 0027625..f3c25d4 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -413,7 +413,7 @@
 
 		if ((flags & H_INTERACTIVE) != 0)
 			while (1) {
-				if (getc() == '\r')
+				if (getchar() == '\r')
 					break;
 			}
 
diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c
index 53358ac..355659b 100644
--- a/drivers/serial/serial.c
+++ b/drivers/serial/serial.c
@@ -90,7 +90,7 @@
 
 		if ((flags & H_INTERACTIVE) != 0)
 			while (1) {
-				if (getc() == '\r')
+				if (getchar() == '\r')
 					break;
 			}
 
diff --git a/include/_exports.h b/include/_exports.h
index 1e9ba86..aeb666c 100644
--- a/include/_exports.h
+++ b/include/_exports.h
@@ -8,7 +8,7 @@
 #define EXPORT_FUNC(a, b, c, ...)
 #endif
 	EXPORT_FUNC(get_version, unsigned long, get_version, void)
-	EXPORT_FUNC(getc, int, getc, void)
+	EXPORT_FUNC(getchar, int, getc, void)
 	EXPORT_FUNC(tstc, int, tstc, void)
 	EXPORT_FUNC(putc, void, putc, const char)
 	EXPORT_FUNC(puts, void, puts, const char *)
diff --git a/include/stdio.h b/include/stdio.h
index aedf374..039f7df 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -5,7 +5,7 @@
 #include <linux/compiler.h>
 
 /* stdin */
-int getc(void);
+int getchar(void);
 int tstc(void);
 
 /* stdout */
diff --git a/lib/charset.c b/lib/charset.c
index a28034e..5686d6f 100644
--- a/lib/charset.c
+++ b/lib/charset.c
@@ -104,7 +104,7 @@
 {
 	int ch;
 
-	ch = getc();
+	ch = getchar();
 	if (ch < 0)
 		ch = 0;
 	return ch;
diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index 426de77..011acca 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -76,7 +76,7 @@
 		if (timer_get_us() > timeout)
 			return 1;
 
-	*c = getc();
+	*c = getchar();
 	return 0;
 }
 
@@ -269,7 +269,7 @@
 
 	/* Empty input buffer */
 	while (tstc())
-		getc();
+		getchar();
 
 	/*
 	 * Not all terminals understand CSI [18t for querying the console size.
@@ -634,13 +634,13 @@
 {
 	int c, mod = 0, ret = 0;
 
-	c = getc();
+	c = getchar();
 
 	if (c != ';') {
 		ret = c;
 		if (c == '~')
 			goto out;
-		c = getc();
+		c = getchar();
 	}
 	for (;;) {
 		switch (c) {
@@ -649,7 +649,7 @@
 			mod += c - '0';
 		/* fall through */
 		case ';':
-			c = getc();
+			c = getchar();
 			break;
 		default:
 			goto out;
@@ -692,25 +692,25 @@
 		 * Xterm Control Sequences
 		 * https://www.xfree86.org/4.8.0/ctlseqs.html
 		 */
-		ch = getc();
+		ch = getchar();
 		switch (ch) {
 		case cESC: /* ESC */
 			pressed_key.scan_code = 23;
 			break;
 		case 'O': /* F1 - F4, End */
-			ch = getc();
+			ch = getchar();
 			/* consider modifiers */
 			if (ch == 'F') { /* End */
 				pressed_key.scan_code = 6;
 				break;
 			} else if (ch < 'P') {
 				set_shift_mask(ch - '0', &key->key_state);
-				ch = getc();
+				ch = getchar();
 			}
 			pressed_key.scan_code = ch - 'P' + 11;
 			break;
 		case '[':
-			ch = getc();
+			ch = getchar();
 			switch (ch) {
 			case 'A'...'D': /* up, down right, left */
 				pressed_key.scan_code = ch - 'A' + 1;
@@ -868,7 +868,7 @@
 static void efi_cin_empty_buffer(void)
 {
 	while (tstc())
-		getc();
+		getchar();
 	key_available = false;
 }
 
diff --git a/test/dm/usb.c b/test/dm/usb.c
index db4b8ba..5d6ceef 100644
--- a/test/dm/usb.c
+++ b/test/dm/usb.c
@@ -427,7 +427,7 @@
 
 		for (c = pos->result; *c; ++c) {
 			ut_asserteq(1, tstc());
-			ut_asserteq(*c, getc());
+			ut_asserteq(*c, getchar());
 		}
 		ut_asserteq(0, tstc());
 	}
